Synchronization method for synchronizing clocks of a bluetooth device

ABSTRACT

A Bluetooth device with a host system and a controller is disclosed. The host system supports a host stack of a Bluetooth protocol, and the controller supports a controller stack of the Bluetooth protocol. The device includes an interface for receiving, at the controller, a piconet-synchronized signal. The device also includes an interface for providing, by the controller to the host system, a derivative of the piconet-synchronized signal. The device also includes a circuit for determining a latency of the providing. The device also includes a circuit for synchronizing, at the host system of the Bluetooth device, a host clock with a timing reference of a master device of the Bluetooth piconet using said latency and the derivative of the piconet-synchronized signal.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims priority to EPO Pat. App. No. EP18306402.1,filed on Oct. 26, 2018, which is incorporated by reference herein in itsentirety for all purposes.

BACKGROUND

Wireless communication is today a key component of mobile devices.Multiple devices part of a wireless network must sometimes besynchronized in order to make transmitted time-related data meaningful.This is, for example, the case when audio data is sent wirelessly tomultiple devices and must be outputted at the same time.

By default, the local clocks of the devices in the wireless network arecompletely unrelated as they are derived from clock signals produced bydifferent clock generators. A clock generator is a hardware oscillator,usually a crystal oscillator, although simpler tank circuits and even RCcircuits may be used. The angular frequency of the hardware oscillatordetermines the rate at which the local clock runs.

All local clocks are subject to a clock drift, also called clock skew;oscillator frequency will vary unpredictably due to various physicaleffects. So, two local clocks issued from two wireless devices differnot only from a relative offset, being the difference of the offsets ofeach local clock compared to real time, but also from a relative drift.Equalizing just the instantaneous values (correcting the offsets) ofclocks is not enough for synchronization since the local clocks willdrift away afterwards.

Therefore, a synchronization scheme should either equalize the clockrates as well as offsets, or it should repeatedly correct the offsets tokeep the clocks synchronized over a time period.

The above definition of synchronization actually defines the strictestform of synchronization, where one seeks perfect matching of time ondifferent clocks, but this definition can be relaxed to differentdegrees according to the needs of an application.

Multiple techniques have been developed to solve this issue. The NetworkTime Protocol (NTP) is a networking protocol for clock synchronizationthat is used by all internet infrastructure. A simplified version,Simple Network Time Protocol (SNTP), has been developed for simpleapplications. The Precision Time Protocol (PTP) is a protocol that isused to synchronize clocks in a Wireless Local Area Network (WLAN). Manyother techniques exist such as Time-sync Protocol for Sensor Networks(TPSN) or Flooding Time Synchronization Protocol (FTSP). All thesetechniques rely on sort of message exchange between the devices and areadvantageous as they do not rely on a particular wireless protocol.

Multiple wireless protocols have been created, such as Wi-Fi orBluetooth, using different spread spectrum techniques to achieve largerbandwidth. Some of them, like Bluetooth, use fast Frequency HoppingSpread Spectrum (FHSS): the carrier is rapidly switched among manyfrequency channels using a pseudorandom sequence known to bothtransmitter and receivers. This inherently requires that bothtransmitter and receivers share a common clock. In Bluetooth, a networkof multiple devices is called a piconet and this clock is the Bluetoothpiconet clock. This clock is used to schedule the transmission ofpackets over the piconet.

In the Bluetooth standard, every Bluetooth device has a Bluetoothreference clock (noted CLKR in the standard), which is driven by thefree running system clock. The free running system clock, which is thecontroller clock, corresponds to the free running clock of the processoron which the controller runs (for instance a quartz clock). EveryBluetooth clock also has a Bluetooth native clock (noted CLKN in thestandard) which is defined from the Bluetooth reference clock CLKR byadding an offset (noted time_based_offset in the standard). Theso-called “Bluetooth clock” (or “Bluetooth piconet clock”, noted CLK inthe standard) corresponds to the Bluetooth native clock CLKN of themaster of the piconet. This Bluetooth clock is shared between all theBluetooth devices of the piconet and used for transmitting and receivingdata packets. More specifically, for each device of the piconet exceptthe master (i.e. all the sink devices), an offset (noted slave_offset inthe standard) is added to its Bluetooth native clock so that itsBluetooth clock (equal to its Bluetooth native clock plus the offset)corresponds to the master's Bluetooth native clock (i.e. the Bluetoothpiconet clock). In the following, for the sake of clarity, the wording“Bluetooth piconet clock” is used to designate the Bluetooth nativeclock of the master, the wording “Bluetooth clock” of the master deviceis used to designate the Bluetooth native clock of the master device,and the wording “Bluetooth clock” of a sink device is used to designatethe result of adding an offset to the Bluetooth native clock of thedevice.

The Bluetooth clocks of the sink devices involved in the piconet areperiodically resynchronized with the Bluetooth piconet clock. The reasonis that, during normal operations, the reception of a packet, defined ata certain Bluetooth tick, must take place in a window length of 20 μs,which allows the packet to arrive up to 10 μs too early or 10 μs toolate.

This behavior is exemplified in relation of FIG. 10. For instance, if apacket 1001 is received at a time t1 while it was expected to bereceived at a time t2, the Bluetooth clock of the sink device may beresynchronized by modifying the slave offsets according to the timeelapsed between t1 and t2. Indeed, the time at which the packet shouldbe received is well defined in the standard and is aligned with theBluetooth piconet clock. Any signal/packet that is expected to bereceived on a Bluetooth piconet on a specific time (as described here)may be a piconet-synchronized signal in the language of the claims.

In addition, each Bluetooth device has a respective local clock, whichis dedicated to some applications, including applications relative tothe audio content (for instance, the local clock of a slave is used forplaying audio data).

The common clock (i.e. Bluetooth piconet clock) that is shared by thetransmitter and the receivers could be used to synchronize the localclocks of the Bluetooth devices part of the piconet. However, thisinformation is only available in the controller stack, the part of theprotocol stack that contains the timing critical radio interface. Thesecond part of the protocol stack, the host stack, that deals with highlevel data, does not have access to the timing information with anaccuracy that is good enough for use cases such as audiosynchronization.

Indeed, the host stack only has access through the Host ControllerInterface (HCI) to a method HCI_Read_Clock that returns the value of theBluetooth piconet clock in ticks in an asynchronous Command Completeevent. Because one tick of the Bluetooth clock is equal to 312.5 μs andbecause the HCI is asynchronous and thus subject to huge delaysdepending of the chip activity (if there is a heavy packet traffic, thecommand will be delayed a lot), the values returned by simultaneousHCI_Read_Clock on the devices of the piconet can vary from severalmilliseconds.

The controller stack is generally implemented in a low-cost silicondevice containing the Bluetooth radio and a microprocessor. The hoststack is generally implemented as part of an operating system, or as aninstallable package on top of an operating system. For integrateddevices such as Bluetooth headsets, the host stack and controller stackcan be run on the same microprocessor to reduce mass production costs.In all cases, the host stack runs on the same processor as theapplication layer and interacts with it. So, because the values of thetiming reference retrieved by the host stack can vary from severalmilliseconds, the synchronization of the local clocks is subject to thesame variations.

Synchronizing precisely local clocks is particularly important forinstance in the context of wireless audio loudspeakers communicatingwith an audio source device via a Bluetooth protocol. In particular,desynchronization between two earbuds (or similar) may be inconvenientfor the user even if the desynchronization is not greater than 300 μs.

By “loudspeaker”, it is meant any electroacoustic transducer, whichconverts an electrical audio signal into a corresponding sound. The term“loudspeaker” includes for instance audio speakers of a stereo system,headphones, earbuds, hearing aids, etc. The audio source device (orsimply “source device”, or “source”) may be, for instance, a mobilephone, a portable game player, a portable media player, a computer, atablet, a television, a control device of a stereo system, etc. In thefollowing, the source device may also be referred to as “control device”(which is different from the “controller”).

In the prior art, many solutions have been proposed to overcome a properrendering of audio on two or more sinks devices and these solutions aredescribed below.

In first wireless loudspeaker systems of the prior art, the loudspeakerscommunicated with an audio source device via a wireless communicationprotocol, such as Bluetooth or Wi-Fi, but were connected to each otherby a wired link. Typically, these systems used a single radio frequency(RF) transceiver to deliver audio to separate loudspeakers via the wiredlink.

In the past few years, some solutions have been implemented to avoidsuch a wired connection between the loudspeakers. These solutions mayconcern systems in which the loudspeakers are earbuds, in the number oftwo (left and right).

One solution consists in a chained connection between the source, thefirst earbud and the second earbud, as represented in FIG. 1a . Thewireless audio system of FIG. 1a comprises an audio source device 101, afirst earbud 102 and a second earbud 103. For instance, the first earbud102 may correspond to the left earbud and the second earbud 103 maycorrespond to the right earbud.

The first earbud 102 is connected to the source device 101 according toa first wireless link 104. Typically, the wireless link 104 is aBluetooth link using the Advanced Audio Distribution Profile (A2DP)constructed from several layers defined by the Bluetooth standard. Astereo stream 105 including packets incorporating stereo data for bothleft and right channels is transmitted from the source device 101 to thefirst earbud 102. The first earbud 102 is configured: (i) to play onlythe audio data relative to one of the two channels (for instance, theleft channel); and (ii) to send the mono audio data 106 relative to theother channel to the second earbud 103, via a second wireless link 107.

Typically, the second wireless link 107 may be a Bluetooth link (forinstance, True Wireless Stereo), or a Near Field Magnetic Induction(NFMI) link. The second wireless link 107 may also be used forexchanging some synchronization parameters between the two earbuds 102and 103.

Another solution consists in a wireless link from the source device toone of the two earbuds, while the other earbud is configured to “sniff”(or “snoop”) the wireless link, as represented in FIG. 1b . The wirelessaudio system of FIG. 1b comprises an audio source device 101, a firstearbud 108 and a second earbud 109. As it has been recited above, thefirst earbud 108 may correspond to the left earbud and the second earbud109 may correspond to the right earbud.

The first earbud 108 is connected to the source device 101 according toa first wireless link 110. Typically, the wireless link 110 is aBluetooth link using the Advanced Audio Distribution Profile (A2DP). Astereo stream 111 including one or more packets incorporating stereodata for both left and right channels is transmitted from the sourcedevice 101 to the first earbud 108.

On the other hand, the first earbud 108 is connected to the secondearbud 109 according to a second wireless link 112 (a Bluetooth link forinstance). The first earbud 108 and the second earbud 109 can exchangesome parameters, including sniffing/decoding parameters 113 for allowingthe second earphone to sniff the first link 110 and to retrieve theaudio data relative to the right channel. However, no audio data isexchanged via the second link 112. According to this solution, thesecond earbud 109 is not connected to the source device 101, and isconfigured to sniff the first wireless link 110.

However, these solutions have drawbacks.

For instance, according to these solutions, a wireless link between thetwo earbuds is required (i.e. an additional transmitter chip can berequired and it may increase the cost of these earbuds). In addition,such link may suffer from transmission instabilities, partly because thehead is effective in blocking radio waves propagation. Furthermore, thewireless link between the two earbuds leads to an increase in batteryconsumption, especially when it is used to retransmit audio data. Inaddition, it is necessary to wait for the second earbud to receive theaudio data and/or the sniffing parameters from the first earbud, whichmay cause latency of the system.

Furthermore, these solutions require that the two earbuds be pairedtogether, which limits the possibilities of controlling the two earbudsindependently from each other.

There also are solutions of the prior art for controlling a plurality ofBluetooth devices (also called “sink devices”) from a source device bycreating a point-to-multipoint link between the source device and theplurality of sink devices, even though this is not initially provided bythe Bluetooth standard.

In the Bluetooth standard, audio transmission is defined by the AdvancedAudio Distribution Profile (A2DP). The A2DP profile is based on theAudio/Video Distribution Transport Protocol (AVDTP) building block whichdefines the procedures between Bluetooth devices for establishing theaudio stream, negotiating the audio stream parameters and transmittingthe audio stream data. According to the AVDTP, an audio stream must beestablished between two Stream End Points (SEPs).

A SEP represents the resources and capacities of a device. For example,a device such as a portable telephone may have three SEPs, onerepresenting its video receiver capacities, another representing itsaudio receiver capacities with an SBC codec and a last representing itsaudio receiver capacities with an aptX codec. Each codec must beassociated with a SEP that is different from that or those to which oneor more codec(s) is or are associated, but a same codec can beassociated with several SEPs.

A limitation imposed by the AVDTP according to the Bluetooth standard isthat when a stream has been negotiated between two SEPs, these two SEPsmust be locked to each other to deliver it. A used SEP cannot be part ofanother stream. Switching to a new stream is typically done byterminating the previous one (such as current social modes).

A solution for controlling a plurality of Bluetooth devices (also called“sink devices”) from a source device is to create several Source StreamEnd Points (SEPs) in the source device controlling chip. A distinctSource SEP may be generated for each Sink SEP to establish one audiostream between the source device and each sink device. For example, andfor this implementation, it is referred to application EP17182123.4,which proposes a Bluetooth chip configured to implement a modified A2DPprofile so as to create such point-to-multipoint link. According to thissolution, a single Bluetooth chip can be used to control severalBluetooth multimedia devices. The A2DP profile is modified withoutviolating the Bluetooth standard, so that interoperability is preservedand the Bluetooth functions are normally supported.

According to such solution, it is possible to transmit respective audiopackets from the master device to each of the sink devices, the masterdevice and the sink devices therefore belonging to a same piconet.

Audio packets may be timestamped on the master side using the localclock of the master device and sent to respective sink devices. On thesink device side, the timestamps may then be used to play the receivedaudio data at the right time.

If no reliable synchronization is performed, it is possible that eachsink device has a different value of its local clock and thus the sinkdevices are not able to play a sound timestamped packet at the sametime, i.e. the time of the timestamp of the received packet.

There is thus a need for an efficient synchronization method for awireless system, in particular a wireless audio system in which theloudspeakers can receive and play audio data without sufferingdesynchronization that might be inconvenient for the user.

The invention aims to provide a reliable synchronization method betweena host clock and a controller piconet synchronized signal in order toachieve a global synchronization of the local clocks of the Bluetoothdevices of the piconet.

SUMMARY

A method for synchronizing a host system of a Bluetooth device of aBluetooth piconet with a timing reference of a master device of theBluetooth piconet is disclosed. The host system supporting a host stackof a Bluetooth protocol, and said Bluetooth device including acontroller supporting a controller stack of the Bluetooth protocol. Themethod comprises: receiving, at the controller, a piconet-synchronizedsignal; providing, by the controller to the host system, a derivative ofthe piconet-synchronized signal; determining a latency of the providing;and synchronizing, at the host system of the Bluetooth device, a hostclock with the master timing reference of the Bluetooth piconet usingsaid latency and the derivative of the piconet-synchronized signal.

The following definitions are applicable.

Master timing reference of the Bluetooth piconet: The system-levelreference that the invention wants to have synchronized with the hostclock. It can be the Bluetooth piconet Clock. It can be a counterbroadcast through the Bluetooth piconet which is incremented with atiming value. It can be any timing reference used to synchronize datapackets among devices in the Bluetooth piconet.

Piconet-synchronized signal: A signal received by the controller thatincludes the master timing reference. If the device is a slave, it canbe a packet which synchronizes the controller Bluetooth Clock based onwhen it is received. As such, this is the broadest term (i.e., anysignal received on a Bluetooth piconet is a piconet-synchronized signalbecause of how the Bluetooth protocol operates). It can be a packet withthe counter value of the master timing reference. Thepiconet-synchronized signal “carries” the master timing reference eitherexplicitly in data or based on when it is transmitted and/or received.

Derivative of the piconet-synchronized signal: Any derivative signalgenerated by the Bluetooth device after receipt of thepiconet-synchronized signal. It could be the master timing extractedfrom the piconet-synchronized signal, a value function of it or a newsignal generated from the piconet-synchronized signal.

Host clock: Any clock that is derived from the physical clock of theprocessor on which the host system of the Bluetooth device runs.

“Providing” by the controller to the host: A broad term that encompassesall of the ways information can be delivered from the controller to thehost, whether it involves a physical medium or not (e.g. an applicationprogramming interface, API). This includes in particular: (i)transferring the derivative of the piconet-synchronized signal with afixed latency from the controller to the host; (ii) transmitting thederivative of the piconet-synchronized signal timestamp of a clockshared by the controller and the host; (iii) transferring a triggeringsignal with a fixed latency when the derivative of the piconetsynchronized signal is read followed by transmitting the derivative ofthe piconet-synchronized signal.

The derivative of the piconet-synchronized signal may be, in one orseveral embodiments, a signal carrying information related to a valuefunction of the Bluetooth clock of the Bluetooth device. By “valuefunction of a clock”, it is meant a value of the clock, or a valuederived (directly or indirectly) from the value of the clock.

The Bluetooth clock of the device is defined by the Bluetooth standardand has been presented above. This Bluetooth clock is a 28-bit counterthat ticks in units of 312.5 μs, which is generally incremented by acounter of the order of 0.5 μs. In one or several embodiments, the valuefunction of the Bluetooth clock may be for instance a non-standard clockderived from this ½ μs-counter. Such non-standard clock ticks in unitsin order of 0.5 μs, which may be particularly advantageous inapplication such as audio playing.

The synchronization of the host clock is optional. Indeed, the abovemethod could be used for determining an accurate value of the Bluetoothclock of the device for other purposes.

Regarding the determination of the latency, there is a plurality of waysfor such determination, especially function of the architecture of thetransmission of message and/or of the architecture of the BT chip. Forinstance, the latency may be a fixed latency (e.g. for instance if thetransmission is synchronous) or the latency may be dynamicallydetermined (e.g. for instance, if the transmission is asynchronous).

The latency may be determined based on a predetermined value associatedwith the Bluetooth device (e.g. a fixed/mean latency of a synchronoustransmission, if said latency is always quite similar amongtransmissions).

By “fixed latency”, it is meant that the latency may be fixed, or mayhave variations that are negligible compared to the synchronizationaccuracy (e.g. within 5% around the mean value of the latency, the meanvalue of the latency being named thus fixed latency).

The providing step may use a synchronous message, a time of transmissionof said synchronous message corresponds to said predetermined value.

The method may further comprise, before the providing step: (i) readingthe derivative of the piconet-synchronized signal; (ii) upon saidreading, sending, by the controller to the host system a secondsynchronous message; and (iii) upon receiving said second synchronousmessage, reading by the host system the value of the host clock (i.e. ata time T1). The latency is determined based on the second synchronousmessage.

The latency may be further determined based on a time (T1) oftransmission of said second synchronous message.

As detailed below, it is not possible to know, a priori, when thederivative of the piconet-synchronized signal has been read. Thederivative of the piconet-synchronized signal can therefore not be usedas such. To overcome this issue, the present invention proposes todetermine a value of a host clock corresponding to the time at which thederivative of the piconet-synchronized signal has been read.

It is thus possible to estimate the derivative of thepiconet-synchronized signal at a given time, for instance at the time atwhich the asynchronous request was sent. It is then possible to use thisvalue to synchronize the host clock of the device.

In one or several embodiments, the method may further comprisedetermining, at the controller of the Bluetooth device, a value functionof a device Bluetooth clock based on when the piconet-synchronizedsignal is received. The value function of the device Bluetooth clock maybe the derivative of the piconet-synchronized signal. The providing stepmay comprise providing the value function of the device Bluetooth clockto the host system.

For example, the providing step may comprise: (i) reading, by thecontroller, a value of the value function of the device Bluetooth clock;and (ii) sending from the controller, to the host system, the value ofthe value function of the device Bluetooth clock.

The local clock, the Bluetooth native clock, the Bluetooth clock and thefree running system clock are different clocks defined in the Bluetoothstandard, and described for instance in the Bluetooth Core Specificationversion 5.0.

In an embodiment, the method may further comprise sending anasynchronous request, from the host system to the controller, forreading the piconet-synchronized signal of the Bluetooth device, and thereading of the piconet-synchronized signal may be performed in responseto said request.

Alternatively, the controller may read and send the piconet-synchronizedsignal to the host system without receiving such request. In anembodiment of the invention, the controller may for instanceperiodically read and send the piconet-synchronized signal to the hostsystem. In another embodiment, the controller may read and send thepiconet-synchronized signal to the host system if a criterion is met.For instance, the offset between the Bluetooth native clock and theBluetooth clock of a device may change. It can be decided that, at eachchange of the offset value, the controller sends a value function of theBluetooth clock to the host system.

In one or several embodiments, the method may further comprise: (i)receiving, at the controller of the Bluetooth device, a secondpiconet-synchronized signal; (ii) providing, by the controller to thehost system, the second piconet-synchronized signal; (iii) wherein thesynchronizing is based on a first counter in the piconet-synchronizesignal and a second counter in the second slave-synchronized signal.

The piconet-synchronized signal and the second piconet-synchronizedsignal may be broadcast on an Active Slave Broadcast transport of theBluetooth Piconet.

Therefore, by repeatedly sending a broadcast message on the Active SlaveBroadcast transport of the Bluetooth Piconet with a incremented number,it is possible to create a synchronizing tool for synchronizing the hostclock of a sink device with the master timing reference of the Bluetoothpiconet.

Another specific embodiment of the invention relates to a Bluetoothdevice of a Bluetooth piconet, said Bluetooth device comprising a hostsystem and a controller, said host system supporting a host stack of aBluetooth protocol, and the controller supporting a controller stack ofthe Bluetooth protocol, wherein the device comprises: (i) an interfacefor receiving, at the controller, a piconet-synchronized signal; (ii) aninterface for providing, by the controller to the host system, aderivative of the piconet-synchronized signal; (iii) a circuit fordetermining a latency of the providing; and (iv) a circuit forsynchronizing, at the host system of the Bluetooth device, a host clockwith a master timing reference of the Bluetooth piconet using saidlatency and the derivative of the piconet-synchronized signal.

Yet another specific embodiment of the invention relates to anon-transitory computer readable storage medium, having stored thereon acomputer program comprising program instructions, the computer programbeing loadable into a data-processing unit and adapted to cause thedata-processing unit to carry out the steps of any of the above methodswhen the computer program is run by the data-processing device.

Another specific embodiment of the invention relates to a method,performed by a Bluetooth device comprising a host system supporting ahost stack of a Bluetooth protocol and a controller supporting acontroller stack of the Bluetooth protocol, for wirelessly transmittingaudio data to a plurality of Bluetooth audio sink devices. This methodmay comprise: (i) creating a point-to-multipoint link from a Bluetoothchip of the Bluetooth device to the plurality of Bluetooth audio sinkdevices; (ii) receiving a main audio stream part; (iii) synchronizing ahost clock of the Bluetooth device with a master timing referenceaccording to one of the above synchronizing methods; (iv) creating aplurality of packet sets based on said main audio stream part, eachpacket set comprising at least one packet, each packet set beingdirected to a respective sink device among the plurality of Bluetoothaudio sink devices; (v) timestamping the at least one packet of eachpacket set based on the synchronized host clock; and (vi) transmittingthe at least one timestamped packet of each packet set to the respectiveBluetooth audio sink device via a respective wireless link of thepoint-to-multipoint link, said respective wireless link connecting theBluetooth device and the respective audio sink device.

This transmission method is advantageous in that it provides apoint-to-multipoint link between the Bluetooth device and the pluralityof sink devices. This point-to-multipoint link may be seen as aplurality of point-to-point links, each of them linking the Bluetoothdevice and a given sink device among the plurality of sink devices, thisplurality of point-to-point links being established “permanently” duringthe connection time (as opposed to the standard Bluetooth communication,in which quick switches to new connections are typically performed byterminating a previous connection while keeping the previous connectedsink device in memory).

By using any of the above synchronization methods, the host clock (whichmay be for instance the local clock) may be accurately synchronized andused for timestamping the audio packets to be sent to each of the sinkdevices.

According to an embodiment of the transmission method, the main audiostream may be an audio stream with multiple channels, and the at leastone transmitted timestamped packet may contain mono audio data relativeto a channel among the multiple channels.

According to this embodiment, only the data relative to the mono audiocontent that has to be played by a given sink device may be sent. Theamount of data that has to be sent is therefore reduced.

Another specific embodiment of the invention relates to a Bluetoothdevice for wirelessly transmitting audio data to a plurality ofBluetooth audio sink devices, the Bluetooth device comprising a hostsystem supporting a host stack of a Bluetooth protocol and a controllersupporting a controller stack of the Bluetooth protocol. This Bluetoothdevice may comprise: (i) a Bluetooth chip configured to create apoint-to-multipoint link from said Bluetooth device to the plurality ofBluetooth audio sink devices; (ii) an interface for receiving a mainaudio stream part; (iii) a circuit for synchronizing a host clock of theBluetooth device with a master timing reference according to one of theabove synchronizing methods; (iv) a circuit for creating a plurality ofpacket sets based on said main audio stream part, each packet setcomprising at least one packet, each packet set being directed to arespective sink device among the plurality of Bluetooth audio sinkdevices; (v) a circuit for timestamping the at least one packet of eachpacket set based on the synchronized local clock; and (vi) a circuit fortransmitting the at least one timestamped packet of each packet set tothe respective Bluetooth audio sink device via a respective wirelesslink of the point-to-multipoint link, said respective wireless linkconnecting the Bluetooth device and the respective audio sink device.

Yet another specific embodiment of the invention relates to anon-transitory computer readable storage medium, having stored thereon acomputer program comprising program instructions, the computer programbeing loadable into a data-processing unit and adapted to cause thedata-processing unit to carry out the steps of any of the abovetransmission methods when the computer program is run by thedata-processing device.

Another specific embodiment of the invention relates to a method forrendering audio signals, the method being performed by a Bluetooth audiosink device configured to be wirelessly connected to a Bluetooth masterdevice, the Bluetooth audio sink device comprising a host systemsupporting a host stack of a Bluetooth protocol and a controllersupporting a controller stack of the Bluetooth protocol, wherein themethod may comprise: (i) synchronizing a host clock of the sink devicewith a master timing reference according to one of the abovesynchronizing methods; (ii) receiving at least one timestamped packet ona dedicated link established between the sink device and the Bluetoothmaster device; and (iii) rendering an audio signal based on the at leastone timestamped packet and on the synchronized host clock of the sinkdevice.

According to an embodiment, said at least one timestamped packet maycontain mono audio data relative to a single audio channel.

Another specific embodiment of the invention relates to a Bluetoothaudio sink device comprising a host system supporting a host stack of aBluetooth protocol and a controller supporting a controller stack of theBluetooth protocol, wherein the Bluetooth audio sink device maycomprise: (i) a circuit for being wirelessly connected to a Bluetoothmaster device; (ii) a circuit for synchronizing a host clock of the sinkdevice according to one of the above synchronizing methods; (iii) aninterface for receiving at least one timestamped packet on a dedicatedlink established between the sink device and the Bluetooth masterdevice; and (iv) an output for rendering an audio signal based on the atleast one timestamped packet and on the synchronized host clock of thesink device.

Yet another specific embodiment of the invention relates to anon-transitory computer readable storage medium, having stored thereon acomputer program comprising program instructions, the computer programbeing loadable into a data-processing unit and adapted to cause thedata-processing unit to carry out the steps of any of the abovereceiving methods when the computer program is run by thedata-processing device.

Another specific embodiment of the invention relates to a wireless audiosystem for wirelessly transmitting audio data from a Bluetooth masterdevice to a plurality of Bluetooth audio sink devices, wherein theBluetooth master device may comprise a host system supporting a hoststack of a Bluetooth protocol and a controller supporting a controllerstack of the Bluetooth protocol.

The Bluetooth master device may further comprise: (i) a Bluetooth chipconfigured to create a point-to-multipoint link from said Bluetoothmaster device to the plurality of Bluetooth audio sink devices; (ii) aninterface for receiving a main audio stream part; (iii) a circuit forcreating a plurality of packet sets based on said main audio streampart, each packet set comprising at least one packet, each packet setbeing directed to a respective sink device among the plurality ofBluetooth audio sink devices; (iv) a circuit for timestamping the atleast one packet of each packet set based on the synchronized hostclock; and (v) a circuit for transmitting the at least one timestampedpacket of each packet set to the respective Bluetooth audio sink devicevia a respective wireless link of the point-to-multipoint link, saidrespective wireless link connecting the Bluetooth master device and therespective audio sink device. Each Bluetooth audio sink device among theplurality of Bluetooth audio sink devices comprises a respective hostsystem supporting a host stack of a Bluetooth protocol and a respectivecontroller supporting a controller stack of the Bluetooth protocol. EachBluetooth audio sink device among the plurality of Bluetooth audio sinkdevices further comprises: (i) a circuit for being wirelessly connectedto the Bluetooth master device; (ii) a circuit for synchronizing a hostclock of the sink device according to any of the above synchronizingmethods; (iii) an interface for receiving at least one timestampedpacket on a dedicated link established between the sink device and theBluetooth master device; and (iv) an output for rendering an audiosignal based on the at least one timestamped packet and on thesynchronized host clock of the sink device.

Other features and advantages of the method and apparatus disclosedherein will become apparent from the following description ofnon-limiting embodiments, with reference to the appended drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIGS. 1a and 1b represent two examples of a wireless audio system of therelated art.

FIG. 2 represents a Bluetooth device of the prior art.

FIG. 3 is a representation of a wireless audio system according to apossible embodiment of the present invention.

FIG. 4a is a flow chart of a general method for synchronizing clocks ofa Bluetooth device, in a possible embodiment.

FIG. 4b is a flow chart of a method for synchronizing clocks of aBluetooth device, in another embodiment.

FIG. 4c is a flow chart of a method for synchronizing clocks of aBluetooth device, in another embodiment.

FIG. 4d is a flow chart of a method for synchronizing clocks of aBluetooth device, in another embodiment.

FIG. 4e is a flow chart of a method for synchronizing clocks of aBluetooth device, in another embodiment.

FIG. 4f represents a synchronization method according to an embodimentof the invention.

FIG. 5 represents a Bluetooth device configured for performing thesynchronization method in a possible embodiment.

FIG. 6 is a flow chart of a method for wirelessly transmitting, by asource device, audio data to several sink devices, in a possibleembodiment.

FIG. 7 is a flow chart of a method for wirelessly receiving, at a sinkdevice, audio data from a source device, in a possible embodiment.

FIG. 8 represents an embodiment of a Bluetooth device configured forperforming the synchronization method.

FIG. 9a represents a possible Bluetooth source device configured forperforming a method for wirelessly transmitting audio data to severalloudspeakers, according to an embodiment.

FIG. 9b represents a possible Bluetooth sink device configured forperforming a method for wirelessly receiving audio data from a sourcedevice, according to an embodiment.

FIG. 10 is an example of resynchronization of a Bluetooth clock of a BTdevice.

DETAILED DESCRIPTION

An approach disclosed herein proposes to synchronize the host clocks ofthe devices of the piconet (including the master device and the sinkdevices) with a master timing reference of the Bluetooth piconet. As anexample and in a non-limiting way, the host clock may be the local clockas defined in the Bluetooth standard, and the master timing reference ofthe Bluetooth piconet may be the Bluetooth piconet clock. In this case,since the Bluetooth clocks of the sink devices are, according to theBluetooth standard, mutually synchronized with the Bluetooth piconetclock, a way to achieve such synchronization is that each Bluetoothdevice (i.e. sinks) synchronizes its local clock with its Bluetoothclock.

However, synchronizing a host clock of a device with a timing referenceincluded in a signal received by the controller of the device is not aneasy task. The reason for that is detailed above, with reference to FIG.2. For the sake of simplification, FIG. 2 represents the specificexample wherein the host clock is the local clock, and the master timingreference of the Bluetooth piconet is the Bluetooth clock of the device.The person skilled in the art would easily understand that thedescription of FIG. 2 provided below is not limited to this case.

Schematically, each Bluetooth device 200 is divided into two parts: thehost system 201 and the controller 202. The host system 201 supports thehost stack of the Bluetooth stack, which includes the protocol higherlayers provided to manipulate and control the controller 202. Saidprotocol higher layers comprise for instance the Logical Link Controland Adaptation Protocol (L2CAP) and the Audio/Video DistributionTransport Protocol (AVDTP). The controller 202 supports the controllerstack of the Bluetooth stack, which includes the protocol lower layersprovided to manipulate and control the radio unit. Said protocol lowerlayers comprise for instance the Link Management Protocol (LMP).Communications between the host system 201 and the controller 202 areperformed via a Host Controller Interface (HCI).

The host stack and controller stack can be run on the samemicroprocessor, or on two separate microprocessors. Usually, for themaster device, the host stack and controller stack are run on twoseparate microprocessors. For sink devices such as earphones, the hoststack and controller stack can be run on the same microprocessor toreduce mass production costs, the size of the device, and the powerconsumption. Of course, it is also possible to use two separatemicroprocessors for the sink devices.

As mentioned above, the Bluetooth clock 205 of a device 200 is obtainedfrom the Bluetooth native clock, which is derived from the Bluetoothreference clock, which is driven by the free running system clock, i.e.the controller clock. Therefore, the Bluetooth clock 205 of the device200 is located on the controller 202 side.

On the other hand, the “local clock” 204 of a Bluetooth device 200 isderived from the host clock (e.g. by adding a timing offset), whichcorresponds to the free running clock of the processor on which the hostsystem 201 runs (for instance a quartz clock). Therefore, the localclock 204 of the device 200 is located on the host system 201 side.

In case the host system 201 and the controller 202 runs on a sameprocessor, the host clock and the controller clock are the same.

For synchronizing the local clock 204 of a device with its Bluetoothclock 205, the host system 201 may send a “Read Clock Command” (e.g. theHCI_Read_Clock command defined in the Bluetooth specification) forreading an estimate of the Bluetooth clock from the controller. Thiscommand is sent through the HCI. However, the message transmission onHCI is an asynchronous, so that it is not possible to know exactly whenthe request is read on the controller side. Therefore, the informationon the Bluetooth clock received in response to the Read Clock Commandcannot reliably be used for synchronizing the local clock 204 of thedevice with its Bluetooth clock 205.

Therefore, synchronizing the local clock of a device with its Bluetoothclock by simply using the result of the command HCI_Read_Clock providedby the specification is not accurate enough, because communications viathe HCI are not synchronous. The present invention overcomes thisproblem and allows a reliable synchronization of the local clock of aBluetooth device with its Bluetooth clock.

FIG. 4a is a flow chart of a general method for synchronizing clocks ofa Bluetooth device, in a possible embodiment.

To ensure the synchronization of the local clocks of the slaves, thepiconet network (a shared physical channel) is used to have a signalthat is synchronized on all of them. This piconet-synchronized signal isreceived (step 401) by the controller of each slave device and containsa timing information.

The controller may then provide a derivative of the piconet-synchronizedsignal to the host (steps 402 and 403), from which the timinginformation can be retrieved.

It is noted that this sending may be triggered at regular interval (e.g.the controller decides by itself the sending without any interactionwith the host) or based on a message (not represented) that is receivedfrom the host as a synchronous message or as an asynchronous message,based on a random trigger, a timed trigger (every x seconds) or acriterion trigger (e.g. if the number of operations performed by thehost processor is greater than a predetermined threshold). This isapplicable for any embodiments described in the present application, forinstance the embodiments described in relation of FIG. 4a, 4b, 4c, 4d ,or 4 e.

Because of the possible asynchronous behavior of the interface betweenthe host and the controller and/or the latency of the transmission ofthis timing information, the host may compute the overall lag (i.e.latency) of the transmission (step 404).

Then, based on the timing information and on the computed lag (i.e.latency), the host (or any module running on the same processor) is ableto synchronize the local clock with the synchronized signal (step 405).Examples of computation of said lag are described below.

Thus, each slave is able to synchronize its local clock with a signalthat is synchronized on all slaves, and so all the slave local clocksare mutually synchronized.

There are multiple ways to compute the time lag (i.e. latency) of thetransmission of the timing information.

The timing information can be transmitted to the host with a fixedlatency (e.g. with variations that are negligible compared to thesynchronization accuracy, e.g. within 5% around the mean value of thelatency, the mean value of the latency being named thus fixed latency)(arrow between 402 and 403). In this case the lag (i.e. latency) isequal to the latency.

In relation of FIG. 4b , the reading of the timing information can beassociated with the reading of a clock that is shared by the controllerand the host. This embodiment may be used when the controller has accessto the local clock, for instance in the case where the host stack andthe controller stack are run on the same microprocessor. It isadvantageous when the controller and the host are running on the sameprocessor (they share a same reference clock). When the controllerretrieves the timing reference (step 401), it also reads a first valueT1 of the shared clock (411). It then sends both timing reference andthe first value of the shared clock to the host in an asynchronous way(step 412, the sending may also be synchronous). It is advantageous inthe implementation where the current Host Controller Interface (HCI) hasan asynchronous behavior. When the host receives the timing referenceand the first value of the shared clock (step 413), it reads a secondvalue T2 of the shared clock (step 414). Then based on the two values ofthe shared clock, the host computes the time lag (i.e. latency) of thetransmission (step 404) (e.g. T2-T1 being the time lag, i.e. thetransmission latency).

In reference of FIG. 4c , the reading of the timing information can beassociated with a triggering signal. When the controller retrieves thetiming reference (step 401), it sends a triggering signal with a fixedlatency LAT to the host (step 421). When the host receives thetriggering signal, it reads a first value T1 of a local clock (step422). Then, the controller sends the timing information in anasynchronous message (arrow between element 401 and 423). When the hostreceives the timing reference (step 423), it reads a second value T2 ofthe local clock (step 424). Then based on the two values of the localclock and the latency of the triggering signal, the host computes thetime lag (i.e. latency) of the transmission (step 404, i.e. T2−T1+LAT).

A synchronization method according to an embodiment of the invention isrepresented in FIG. 4f (where LAT, the latency, is assumed to be 0 ornegligible, for the sake of the understanding). At a first instant t₂₀,the host system may send a command, noted “read_clk_bis” in FIG. 4f , tothe controller for reading a current value of the Bluetooth clock of thedevice. The Bluetooth clock is a 28-bit counter that ticks in units of312.5 μs (i.e. half a time slot), which corresponds to a clock rate of3.2 kHz. Using the Bluetooth clock for synchronizing the local clock maycause a delay between the earphones that is not acceptable.

In practice, the Bluetooth clock is generally incremented by a counterof the order of 0.5 μs. Therefore, it is possible to derive anon-standard clock from this ½ μs-counter that can be used for thesynchronization. This non-standard clock is hereinafter referred to as“½ μs-Bluetooth clock” for the sake of simplification, even if thisdenomination does not have a consecrated technical meaning. This ½μs-Bluetooth clock may be particularly advantageous in applications suchas audio playing, because it has a tick period significantly lower thanthe one of the Bluetooth clock.

The “read_clk_bis” command may therefore be a command for reading the(standard) Bluetooth clock or the (non-standard) ½ μs-Bluetooth clock,according to the chosen embodiment.

In the embodiment wherein the clock to be read is the Bluetooth clock,the “read_clk_bis” command may be the “read_clk” command provided by theBluetooth standard. In the embodiment wherein the clock to be read isthe ½ μs-Bluetooth clock, the “read_clk_bis” command may be avendor-specific command added to the Bluetooth stack. The followingdetails the case where the local clock is synchronized with the ½μs-Bluetooth clock of the device. Of course, the method described can beeasily adapted for synchronizing the local clock with the (standard)Bluetooth clock of the device.

Referring again to FIG. 4f , at a second instant noted t₂₂, the value ofthe ½ μs-Bluetooth clock BT_(1/2μs)(t₂₂) may be read by the controller.Then, at a third instant t₂₅, the host system may receive the value ofthe ½ μs-Bluetooth clock that has been read by the controller at t22.

The command “read_clk_bis” is sent from the host to the controller viathe HCI. Therefore, this command is also asynchronous. This impliesthat, when the controller receives the value BT_(1/2μs)(t₂₂), thecontroller does not know when this value was read—the received valuecould correspond to the value of the ½ μs-Bluetooth clock read at anytime between t₂₀ and t₂₅.

To overcome this problem, the invention provides to associate a readingof another clock to the reading of the ½ μs-Bluetooth clock. Forinstance, this other clock may be the local clock. Since the local clockis located into the host system, this information allows the host systemto know when the value of the ½ μs-Bluetooth clock has been read. TheBluetooth clock may then be synchronized based on these values.

For instance, at t₂₅, the host system may also receive the value of thelocal clock loc_clk(t₂₂) at time t₂₂ at which the clock was read, as inthe embodiment represented in FIG. 4f . Of course, the valueloc_clk(t₂₂) may be received at a different time than t₂₅ depending onthe embodiment chosen.

Sending the “read_clk_bis” asynchronous request is optional. Accordingto an embodiment of the invention, the controller may send the value ofthe ½ μs-Bluetooth clock without a request being sent to it first.

Several embodiments of the reading of the local clock are detailedbelow.

In one possible embodiment, the host stack and the controller stack maybe run on a same microprocessor. In that case, the controller has accessto the local clock. Therefore, the read_clk_bis command may be acommand, transmitted from the host system to the controller, for readingboth the ½ μs-Bluetooth clock value and the local clock value. The hostsystem may then receive, from the controller, the value of the ½μs-Bluetooth clock and the value of the local clock corresponding to asame reading time.

According to the example depicted in FIG. 4f , the read_clk_bis commandmay be sent at time t₂₀, the value of the ½ μs-Bluetooth clock and thevalue of the local clock may be read by the controller at time t₂₂, andthe host system may receive these values at time t₂₅.

The value of the Bluetooth clock of the device at a given time (in theabove example, this given time corresponds to t₂₀) may then be obtainedbased on the value BT_(1/2μs_)clk (t₂₂) of the ½ μs-Bluetooth clock andthe value loc_clk(t₂₂) of the local clock.

For instance, the value BT_clk (t₂₀) of the Bluetooth clock at time t₂₀may be computed as:BT_clk(t ₂₀)=BT _(1/2μs_) clk(t ₂₂)−Δtwhere Δt is the time elapsed between t₂₀ and t₂₂, with t₂₂=loc_clk(t₂₂),and BT_clk (t₂₂), BT_(1/2μs_)clk (t_(i)) are the values of the Bluetoothclock and the ½ μs-Bluetooth clock at times t_(i) and t_(j),respectively, expressed in time value (e.g. multiplied by theirrespective tick periods).

Furthermore, the drift between t₂₀ and t₂₅ can be neglected, so that thevalue of the Bluetooth clock at t₂₅ may be estimated by:BT_clk(t ₂₅)=BT_clk(t ₂₀)+5

More generally, if the read_clk_bis command is sent at a given time t₁,the value (expressed in time value) of the Bluetooth clock BT_clk_t₁ atsaid given time t₁ may be determined by:BT_clk_t ₁ =BT _(1/2μs_) clk−Δt _(1,2)where BT_(1/2μs_)clk is the value of the ½ μs-Bluetooth clock (expressedin time value) received in response to said command, and Δt_(1,2) istime elapsed between t₁ and t₂, t₂ being the time at which the value ofthe ½ μs-Bluetooth clock has been read by the controller.

If t₃ denotes the time at which the host system received the value ofthe ½ μs-Bluetooth clock, the value BT_clk_t₃ of the Bluetooth clock attime t₃ may be determined by:BT_clk_t ₃ =BT _(1/2μs_) clk+Δt _(2,3)where Δt_(2,3) is the time elapsed between t₂ and t₃.

Once the value of the Bluetooth clock is estimated, the local clock ofthe device may be synchronized with this Bluetooth clock. In a piconet,this method allows to precisely synchronize all devices.

Indeed, the local clock of the master device can be thereforesynchronized with its Bluetooth clock (optional), the local clock ofeach slave device can also be synchronized with their Bluetooth clock.Since the Bluetooth clocks of all the devices—master and slaves—aresynchronized with each other, all the local clocks of the piconetdevices are therefore synchronized. Furthermore, in case thesynchronization uses the ½ μs-Bluetooth, this synchronization has aprecision of the order of ½ μs+the synchronization precision of the BTprotocol (of the order of 10 μs), which is advantageous for applicationssuch as audio playing.

In the above described embodiment, the value loc_clk(t₂₂) of the localclock is used for indicating when the value of the ½ μs-Bluetooth clockhas been read. It has to be noted that any clock shared between thecontroller and the host system can be used for this purpose. Forinstance, in case the controller and the host system are run on a sameprocessor, the value of the controller clock (also called “Free runningsystem clock”) can be sent from the controller to the host system, aswell as any clock derived from the controller clock, instead of thevalue of the local clock.

In another possible embodiment, the host stack and the controller stackmay be run on two separate microprocessors. In that case, the controllerdoes not have access to the local clock, so that another method isneeded for retrieving the time at which the value of the ½ μs-Bluetoothclock is read.

A solution consists in “listening” on a port to determine when thecontroller reads the value of the ½ μs-Bluetooth clock. For instance,the controller may send a message to the host system as the controllerreads the value of the ½ μs-Bluetooth clock. When the host systemreceives the message, the host system can read the current value of thelocal clock. For this current value to correspond to the time at whichthe controller has read the value of the ½ μs-Bluetooth clock, themessage must be synchronous.

For instance, the synchronous message may be sent via a low-level layer(i.e. it is not send through the HCI interface or the BT stack, it maybe an external interrupt). FIG. 5 represents a Bluetooth deviceconfigured for sending such asynchronous message.

As represented in FIG. 5, communications between the host system 201 andthe controller 202 may be performed via a physical interface comprisinga plurality 502 of ports. The type of the physical interface may be forinstance USB, UART and RS232. A set 503 of these ports may be dedicatedfor implementing the asynchronous Host Controller Interface (HCI) asdefined in the Bluetooth standard. More specifically, the HCI driver 501a located in the host system 201 and the HCI firmware 501 b located inthe controller 202 may communicate via this set 503 of ports.

The remaining ports, e.g. 504, may be used for performing low-levelcommunications between the host system 201 and the controller 202. Forinstance, a synchronous message may be sent on the port 502 from thecontroller 202 to the host system 201 for triggering a reading, by thehost system, of the current local clock.

Referring again to FIG. 4f , according to this embodiment, theread_clk_bis command may be sent at time t₂₀ and the value of the ½μs-Bluetooth clock may be read by the controller at time t₂₂. In thesame time t₂₂, the controller may send a synchronous message to the hostsystem. When the host system receives this synchronous message, it mayread the current value of the local clock, loc_clk(t₂₂). Again, anotherclock than the local clock may be used for determining when the value ofthe ½ μs-Bluetooth clock has been read by the controller. For instance,the host clock or any clock derived from the host clock may be used.

At t₂₅, the host system may receive the value of the ½ μs-Bluetoothclock BT_(1/2μs_)clk (t₂₂) that has been read at t₂₂. The Bluetoothclock may then be determined based on the value of the ½ μs-Bluetoothclock and the value of the local clock similarly as in the previousembodiment. Of course, all the formulas presented above remain valid, aswell as the synchronization of the local clock with the Bluetooth clock.

Even though this embodiment is particularly advantageous in the casewhere the host stack and the controller stack are run on two separatemicroprocessors, it has to be noted that it may also be used in the casewhere the host stack and the controller stack are run on the samemicroprocessor.

FIG. 4d is a flow chart of a method for synchronizing clocks of aBluetooth device, in another embodiment. In this embodiment, thesynchronization is achieved by synchronizing all the devices' localclocks with the piconet clock.

As mentioned above, the Bluetooth devices in a piconet share a sameBluetooth clock: every Bluetooth device shall have a native clock thatshall be derived from a free running reference clock. Forsynchronization with other Bluetooth devices in a piconet, offsets areused that, when added to the native clock, provide temporary Bluetoothclocks that are mutually synchronized. The Bluetooth clock ticks inunits of 312.5 μs (i.e. half a time slot), giving a clock rate of 3.2kHz. The Bluetooth clocks of the devices involved in the piconet areperiodically resynchronized. The reason is that, during normaloperation, the reception of a packet, defined at a certain Bluetoothtick, must take place in a window length of 20 μs (a packet can arriveup to 10 μs too early or 10 μs too late). This mechanism can be used tosynchronize the local clocks (used to time audio) of the devices. Incase the Bluetooth clock is used directly, the delay between the slavescan go up to 312.5 μs (one tick), which may not be enough for some usecases. Instead, the half microseconds counters used to implement theBluetooth clocks may be used. Therefore in said embodiment, the masterclock retrieved from the signal is the half microseconds countersBT_(1/2μs).

At step 431, the controller may read a current value of the ½μs-Bluetooth clock (for instance, this current value may correspond tothe time t₂₂ of FIG. 4f ). This value may then be received (step 432) bythe host (for instance, at the time t₂₅ of FIG. 4f ). The computation(step 404) of the lag (i.e. latency) may be one method describe above.

In reference to FIG. 4e , another technique to achieve a propersynchronization between the slaves is to use an additional broadcastlink: broadcast events are received at the same time (with the accuracyof the reception window length) and so their receptions can be used assignals synchronized on the slaves.

The broadcast data can contain a timing information that is directly themaster local clock (with potentially an additional offset to take intoaccount the transmission delay) (or a function of said master localclock) or the number of the packet that must be played in a certaintiming.

In this latest case, a broadcast signal can be sent every ten seconds,containing a counter. The controller may retrieve this counter from thebroadcast signal (step 441) and provide it to the host. Upon receptionof the counter (step 442) the host may compute (step 404) the time lag(i.e. latency) of the transmission. The computation (step 404) of thelag (i.e. latency) may be one method describe above.

The host may then synchronize (405) its clock with a value function ofthe counter (C) times the counter step (e.g. 10 seconds) plus the timelag (i.e. latency) of the transmission of the counter between thecontroller and the host (i.e. a value function of C×counter_step+lag).

The Bluetooth standard provides a way to broadcast data to all slaves ina piconet using an Active Slave Broadcast (ASB) transport. An ASB isimplicitly created whenever a piconet exists. The ASB transport is usedto transport L2CAP user traffic and certain LMP traffic to all devicesin the piconet that are currently connected to the piconet physicalchannel that is used by the ASB.

There is no acknowledgment protocol and the traffic is uni-directionalfrom the piconet master to the slaves. Thus, the ASB logical transportis unreliable. To improve reliability somewhat each packet can betransmitted a number of times. The ASB transport in the piconet can beused to trigger clocks synchronization as described above.

FIG. 8 represents an embodiment of a Bluetooth device configured forperforming the synchronization method. In this embodiment, the device800 comprises a computer (or any computing/electronic device), thiscomputer comprising a memory 806 to store program instructions loadableinto a circuit 807 and adapted to cause circuit 807 to carry out thesteps of the present invention when the program instructions are run bythe circuit 807. The memory 806 may also store data and usefulinformation for carrying the steps of the present invention as describedabove. The circuit 807 may comprise a first circuit 803 located in thehost system, a second circuit 805 located in the controller, and aninterface 804 for exchanging data between the host system and thecontroller.

Each of the circuits 803 and 805 may be for instance:

-   -   a processor or a processing unit adapted to interpret        instructions in a computer language, the processor or the        processing unit may comprise, may be associated with or be        attached to a memory comprising the instructions, or    -   the association of a processor/processing unit and a memory, the        processor or the processing unit adapted to interpret        instructions in a computer language, the memory comprising said        instructions, or    -   an electronic card wherein the steps of the invention are        described within silicon, or    -   a programmable electronic chip such as a FPGA chip (for        «Field-Programmable Gate Array»).

To ease the interaction with the computer, a screen 801 and a keyboard802 may be provided and connected to the computer circuit 807 (even ifit is not mandatory).

The synchronization methods presented above may be used forsynchronizing clocks of Bluetooth devices of a wireless audio system, asdescribed below.

FIG. 3 represents a wireless audio system according to a possibleembodiment of the present invention.

This wireless audio system comprises an audio source device 300, a firstearbud 301 and a second earbud 302. For instance, the first earbud 301may correspond to the left earbud and the second earbud 302 maycorrespond to the right earbud.

According to an embodiment, the source device 300 comprises a Bluetoothchip (not represented in FIG. 3) arranged to generate several SEPs tocontrol the sink devices 301, 302. For instance, the Bluetooth chip maygenerate a distinct Source SEP for each Sink SEP (corresponding to eachBluetooth sink device that it must control). This configurationseemingly consists in point-to-point links, from the source 300 to thesink devices 301, 302.

The source device 300 establishes a Bluetooth wireless link 303, 304with each earbud 301, 302, so that the three devices 300, 301 and 302form a Bluetooth piconet 310. All the controllers of the devices 300,301 and 302 of the piconet 310 share a physical radio channel and aresynchronized to a common clock (the so-called Bluetooth piconet clock)and frequency hopping pattern (this is not the case for the hosts of thedevices, which are not synchronized by default). In this configuration,the source device 300 corresponds to the master device (or simply“master”), and the earbuds 301, 302 correspond to the slave devices (orsimply “slaves”). The controller of the master 300 provides thesynchronization reference, while the controllers of the slaves 301, 302are synchronized to the master's Bluetooth native clock and frequencyhopping pattern. Of course, even if FIG. 3 depicts two earbuds, thepresent invention is not limited to this case. For instance, the sinkdevices may be any loudspeakers as defined above, and not necessarilyearphones or earbuds. Furthermore, there can be more than two sinkdevices.

Typically, each of the first link 303 and the second link 304 is abidirectional Bluetooth link using standard A2DP Profile. Indeed, thefirst link 303 and/or the second link may also carry other profiles suchas the Audio Video Remote Control Profile (AVRCP) for volume control,play/pause/next features or the Hands-Free Profile (HFP) for voice dataexchanges.

In one embodiment, a mono stream 305 including one or more packetsincorporating mono data for the left channel may be transmitted from thesource device 300 to the first earbud 301 via link 304, and a monostream 306 including one or more packets incorporating mono data for theright channel may be transmitted from the source device 300 to thesecond earbud 302 via link 303. According to this embodiment, eachstream has advantageously a mono configuration, instead of a stereoconfiguration as in the prior art, thereby saving bandwidth usage,batteries and limiting magnetic exposition.

Furthermore, the codec used for each stream 305, 306 may beadvantageously identical, to avoid having different audio quality on theearbuds. For instance, the standard mandatory SBC codec may be used foreach of the streams 305 and 306. Of course, other codecs may be used,such as LDAC, apt-X or AAC.

Alternatively, the codec used for each stream 305, 306 may be different.For instance, if the first earbud has a lower battery level than thesecond earbud, it may be decided to use a lower audio quality on thefirst earbud (e.g. to limit the processed data or to limit the number ofoperations) or to use a different codec which requires less operationsto decode the audio data.

The solution depicted in FIG. 3 offers many advantages over the priorart, including for instance:

-   -   Higher stability: since two mono streams 305 and 306 are sent,        instead of one stereo stream in the solutions of the prior art,        the bandwidth usage is almost the same and, because there is no        need for data retransmission through the head, the stability can        be improved.    -   Battery improvements: since there is no retransmission between        the first earbud and the second earbud, the battery life is        increased (there may be up to 50%-90% improvement in battery        life over the chained solution of the prior art). The battery        size can also be reduced, leading to a lower cost and a smaller        overall size of the device;    -   Lower latency: because there is no retransmission between the        first earbud and the second earbud and no need to wait that the        second earbud receives the audio data or the sniffing        parameters, it also reduces the system latency;    -   Ability to control both earbuds independently: since two        separate communication links are created between the source        device 300 and each of the earbuds 301 and 302, the earbuds 301        and 302 may be controlled independently of each other. This        offers opportunities for new applications, such as real-time        translation: if each of the two earbuds includes a microphone,        two independent communication links in two different languages        may be created according to a translation technology (by using,        for instance, a modified HFP profile for enabling a multi-device        utilization). This could allow two people to share the pair of        earbuds and have a multilingual conversation.

The audio packets of the streams 305 and 306 may be timestamped to beplayed by the sink devices 301, 302 at the right time. For instance,according to the Bluetooth standard, the audio packets are timestampedusing the local clock of the source device 300. Each of the sink devices301 and 302 may therefore receive, via its dedicated link 303 and 304with the source device 300, audio packets including a respectivetimestamp defined from the local clock of the source device 300.

Advantageously, the clock frequency necessary to create the timestampmay be set to the sample rate of the encoded audio data. For instance,with the SBC codec, if a media payload consists of multiple SBC frames,the timestamp of the media packet header represents the timestamp of thefirst SBC frame. The timestamp of the following SBC frames may becalculated using the sample rate, the number of samples per frame perchannel, and the timestamp of the first SBC frame. When a SBC frame isfragmented into multiple media packets, all packets that make up afragmented SBC frame may use the same timestamp.

The timestamps are used to play the received audio data at the righttime, and should take into account the buffering time of the slaves.However, using only these timestamps does not ensure that thesynchronization is good enough, even if the internal latency of eachdevice is taken into account.

Indeed, it is also necessary that the local clocks of the sink devicesare sufficiently mutually synchronized. By “sufficiently mutuallysynchronized”, it is meant that the local clocks of the sink devices arenot shifted by a delay greater than a predefined threshold (thethreshold depending on the application and the ear tolerance). Forinstance, in the case of wireless earbuds, this delay should not exceed40 μs.

In the case of an audio wireless system in which a point-to-multipointlink is created between a source (or master) device and a plurality ofsink (or slave) devices, like the one represented in FIG. 3, one of theprevious synchronization methods may be used, at the source deviceand/or at a sink device.

FIG. 6 is a flow chart of a method for wirelessly transmitting, by asource device, audio data to several sink devices, in a possibleembodiment.

At step 601, the master device may establish a point-to-multipoint linkwith the plurality of sink devices (elements 303 and 304 of FIG. 3). Atstep 602, the master device may receive an audio stream part to beplayed by the sink devices. At step 603, the master may synchronize itslocal clock with the master timing reference of the Bluetooth piconetaccording to any of the synchronization methods presented above. At step604, a plurality of packet sets may be created from the audio streampart. Each packet set may contain at least one audio packet, and eachpacket set may be directed to a respective sink device for thecorresponding content to be played by said sink device. It is noted thatsteps 602, 603, 604 could be executed in different orders. For instance,the synchronization step 603 may be performed before receiving 602 theaudio stream part, or after separating 604 the audio stream part into aplurality of packets.

The packets of each packet set may then be timestamped 605.Advantageously, packets that correspond to time-related audio data areidentically timestamped (i.e. packets containing sound-data that shouldbe rendered at the same time have the same timestamp, even if they aretransmitted in two distinct links). For instance, a buffer on the masterdevice may contain the audio stream part. The master device may encodethe left channel for the first slave, packetize it and tag it with afirst timestamp. The master device may also encode the right channel forthe second slave, packetize it and tag it with the same first timestamp.

The timestamped audio packets are then transmitted 606 from the masterto the proper slave, via the corresponding wireless link. For instance,the timestamped audio packets corresponding to the left channel may besent to the first earbud via the first wireless link, and thetimestamped audio packets corresponding to the right channel may be sentto the second earbud via the second wireless link.

Furthermore, the master device may periodically perform thesynchronization operation 603 to compensate the drift of its localclock.

It has to be noted that the synchronization step 603 is optional. In awireless audio system, what is really important is that the host clocksof the slaves are mutually synchronized (to play corresponding audiocontents at the same time on both speakers). If the host clock of themaster is not synchronized with the master timing reference of theBluetooth piconet, there is no inconvenient impact for the user.

FIG. 7 is a flow chart of a method for wirelessly receiving, at a sinkdevice, audio data from a source device, in a possible embodiment.

It is supposed that a link has already been established between themaster and the sink device. At step 701, the sink device may receiveaudio data in form of timestamped encoded audio packets. At step 702,the sink device may synchronize its local clock with the master timingreference of the Bluetooth piconet according to any of thesynchronization methods presented above. Of course, the synchronization702 may be performed before the reception 701 of audio data. The sinkdevice may further decode the received audio data, put it into a buffer(step 703) and render it (step 704) when its local clock is equal to thetimestamp of the related packet.

It is noted that the steps depicted in FIG. 7 may be performed by eachsink device of the piconet. Furthermore, the sink devices mayperiodically perform the synchronization operation 702 (for example,every one second) to compensate the drift of their local clocks (i.e.BT_(1/2μs)+LAG in case of a fixed lag time or based on any methoddescribed above). They may also use a control loop to take into accountthe unfixed delay introduced by the output of the sound.

The advantage of this method is that it does not require additionalbandwidth for the synchronization (no additional wireless link).

When the synchronization between the slaves is based on a broadcast link(as described above, in reference to FIG. 4e ), the transmission ofaudio data from a source device to a plurality of sink devices and therendering of corresponding audio signals by the sink devices may beperformed as follows.

After establishing the first and the second wireless links and streamsand the broadcast link, the master device sends a sync broadcast packetthat is used by the slaves to synchronize their local clocks. It thenencodes the audio data, packetizes it, timestamps it and sends it to theslaves.

After establishing its wireless link/stream and the broadcast link withthe master, each slave receives a broadcast sync packet and synchronizesits local clock accordingly. When it receives audio data, it decodes it,puts it into a buffer and outputs it when the local clock is equal tothe timestamp of the related packet.

The slaves may periodically resynchronize their local clock with thesource clock (for example, every one second) to compensate the drift ofthe local clocks over time and thus the master may periodically send abroadcast sync packet. They may also use a control loop to take intoaccount the unfixed delay introduced by the output of the sound.

FIG. 9a represents a possible Bluetooth source (or “master”) deviceconfigured for performing a method for wirelessly transmitting audiodata to several loudspeakers, according to an embodiment.

In this embodiment, the source device 900 comprises a memory 904 tostore program instructions loadable into a circuit and adapted to causecircuit 903 to carry out the steps of the present invention when theprogram instructions are run by the circuit 903.

The memory 904 may also store data and useful information for carryingthe steps of the present invention as described above.

The circuit 903 may be for instance:

-   -   a processor or a processing unit adapted to interpret        instructions in a computer language, the processor or the        processing unit may comprise, may be associated with or be        attached to a memory comprising the instructions, or    -   the association of a processor/processing unit and a memory, the        processor or the processing unit adapted to interpret        instructions in a computer language, the memory comprising said        instructions, or    -   an electronic card wherein the steps of the invention are        described within silicon, or    -   a programmable electronic chip such as a FPGA chip (for        «Field-Programmable Gate Array»).

This device 900 comprises an input interface 902 for the reception of acontrol signal relative to audio data to be played by a loudspeakersystem according to the invention and an output interface 905 (e.g. aBluetooth interface, similar to the element 807 of FIG. 8) fortransmitting audio signals to the loudspeakers via an antenna 907.

To ease the interaction with the device, the source device 900 maycontain a Human Machine Interface 901 connected to the circuit 903.

Furthermore, the block diagram represented in FIG. 6 is a typicalexample of a program for which instructions can be executed by thesource device described. FIG. 6 may thus correspond to the flowchart ofthe general audio transmission algorithm of a computer program withinthe meaning of the invention.

FIG. 9b represents a possible Bluetooth sink (or “slave”) deviceconfigured for performing a method for wirelessly receiving audio datafrom a source device, according to an embodiment.

In this embodiment, the device 910 comprises a memory 914 to storeprogram instructions loadable into a circuit and adapted to causecircuit 913 to carry out the steps of the present invention when theprogram instructions are run by the circuit 913. The memory 914 may alsostore data and useful information for carrying the steps of the presentinvention as described above.

The circuit 913 may be for instance:

-   -   a processor or a processing unit adapted to interpret        instructions in a computer language, the processor or the        processing unit may comprise, may be associated with or be        attached to a memory comprising the instructions, or    -   the association of a processor/processing unit and a memory, the        processor or the processing unit adapted to interpret        instructions in a computer language, the memory comprising said        instructions, or    -   an electronic card wherein the steps of the invention are        described within silicon, or    -   a programmable electronic chip such as a FPGA chip (for        «Field-Programmable Gate Array»).

This device 910 comprises:

-   -   an input wireless Bluetooth interface 912 receiving audio        signals and establishing bidirectional wireless link with a        source device via a Bluetooth antenna 911 according to the        invention;    -   an output audio circuit 916 that contains at least a        digital-to-analog converter (DAC) 916 a and an audio amplifier        916 b;    -   an audio buffer 915 to temporarily storing digitized audio        before it is transferred to the audio output circuit. In one        possible embodiment the buffer 915 may be included in the memory        914; and    -   a loudspeaker 917 to convert the electronic signals output from        the amplifier into sound.

In one embodiment, the device 910 may also comprise a microphone and amicrophone input circuit for voice data transmission.

Furthermore, the block diagram represented in FIG. 7 is a typicalexample of a program for which instructions can be made to the sinkdevice described. FIG. 7 may thus correspond to the flowchart of thegeneral algorithm of a computer program within the meaning of theinvention.

Of course, the present invention is not limited to the embodimentsdescribed above as examples. It extends to other variants. For example,the disclosed methods can be applied to earbud pair systems, in whichaudio data is sent to each pair of earphones.

Depending on the embodiment chosen, certain acts, actions, events orfunctions of each of the methods described herein may be performed oroccur in a different order from that in which they were described, ormay be added, merged or not to be performed or not to occur, as the casemay be. In addition, in some embodiments, certain acts, actions orevents are performed or occur concurrently and not successively.

Although described through a number of detailed exemplary embodiments,the proposed method and equipment for implementing the method includesvarious alternatives, modifications and improvements which will beapparent to those skilled in the art, it being understood that thesevarious variants, modifications and improvements fall within the scopeof the invention, as defined by the following claims. In addition,various aspects and features described above may be implementedtogether, or separately, or substituted for each other, and all of thevarious combinations and sub-combinations of aspects and features arewithin the scope of the invention. In addition, some of the systems andequipment described above may not incorporate all of the modules andfeatures described for the preferred embodiments.

It is noted that a “local clock” may be replaced with “host clock” inthe above description.

What is claimed is:
 1. A method, performed by a Bluetooth devicecomprising a host system supporting a host stack of a Bluetooth protocoland a controller supporting a controller stack of the Bluetoothprotocol, for wirelessly transmitting audio data to a plurality ofBluetooth audio sink devices, the method comprising: creating apoint-to-multipoint link from a Bluetooth chip of the Bluetooth deviceto the plurality of Bluetooth audio sink devices; receiving a main audiostream part; synchronizing a host clock of the Bluetooth device with amaster timing reference by: (i) receiving, at the controller, apiconet-synchronized signal; (ii) providing, by the controller to thehost system, a derivative of the piconet-synchronized signal; (iii)determining a latency of the providing; and (iv) synchronizing, at thehost system of the Bluetooth device, the host clock with the mastertiming reference using said latency and the derivative of thepiconet-synchronized signal; creating a plurality of packet sets basedon said main audio stream part, each packet set comprising at least onepacket, each packet set being directed to a respective Bluetooth audiosink device among the plurality of Bluetooth audio sink devices;timestamping the at least one packet of each packet set based on thesynchronized host clock; and transmitting the at least one timestampedpacket of each packet set to the respective Bluetooth audio sink devicevia a respective wireless link of the point-to-multipoint link, saidrespective wireless link connecting the Bluetooth device and therespective Bluetooth audio sink device.
 2. The method of claim 1,wherein the main audio stream is an audio stream with multiple channels,and wherein the at least one transmitted timestamped packet containsmono audio data relative to a channel among the multiple channels.
 3. ABluetooth device for wirelessly transmitting audio data to a pluralityof Bluetooth audio sink devices, the Bluetooth device comprising a hostsystem supporting a host stack of a Bluetooth protocol and a controllersupporting a controller stack of the Bluetooth protocol, the Bluetoothdevice comprising: a Bluetooth chip configured to create apoint-to-multipoint link from said Bluetooth device to the plurality ofBluetooth audio sink devices; an interface for receiving a main audiostream part; a circuit for synchronizing a host clock of the Bluetoothdevice with a master timing reference by: (i) receiving, at thecontroller, a piconet-synchronized signal; (ii) providing, by thecontroller to the host system, a derivative of the piconet-synchronizedsignal; (iii) determining a latency of the providing; and (iv)synchronizing, at the host system of the Bluetooth device, the hostclock with the master timing reference using said latency and thederivative of the piconet-synchronized signal; a circuit for creating aplurality of packet sets based on said main audio stream part, eachpacket set comprising at least one packet, each packet set beingdirected to a respective Bluetooth audio sink device among the pluralityof Bluetooth audio sink devices; a circuit for timestamping the at leastone packet of each packet set based on the synchronized host clock; anda circuit for transmitting the at least one timestamped packet of eachpacket set to the respective Bluetooth audio sink device via arespective wireless link of the point-to-multipoint link, saidrespective wireless link connecting the Bluetooth device and therespective Bluetooth audio sink device.
 4. A non-transitory computerreadable storage medium, having stored thereon a computer programcomprising program instructions, the computer program being loadableinto a data-processing unit and adapted to cause the data-processingunit to carry out a method, performed by a Bluetooth device comprising ahost system supporting a host stack of a Bluetooth protocol and acontroller supporting a controller stack of the Bluetooth protocol, forwirelessly transmitting audio data to a plurality of Bluetooth audiosink devices, when the computer program is run by the data-processingunit, the method comprising: creating a point-to-multipoint link from aBluetooth chip of the Bluetooth device to the plurality of Bluetoothaudio sink devices; receiving a main audio stream part; synchronizing ahost clock of the Bluetooth device with a master timing reference by:(i) receiving, at the controller, a piconet-synchronized signal; (ii)providing, by the controller to the host system, a derivative of thepiconet-synchronized signal; (iii) determining a latency of theproviding; and (iv) synchronizing, at the host system of the Bluetoothdevice, the host clock with the master timing reference using saidlatency and the derivative of the piconet-synchronized signal; creatinga plurality of packet sets based on said main audio stream part, eachpacket set comprising at least one packet, each packet set beingdirected to a respective Bluetooth audio sink device among the pluralityof Bluetooth audio sink devices; timestamping the at least one packet ofeach packet set based on the synchronized host clock; and transmittingthe at least one timestamped packet of each packet set to the respectiveBluetooth audio sink device via a respective wireless link of thepoint-to-multipoint link, said respective wireless link connecting theBluetooth device and the respective Bluetooth audio sink device.
 5. Awireless audio system for wirelessly transmitting audio data from aBluetooth master device to a plurality of Bluetooth audio sink devices,wherein the Bluetooth master device comprises a host system supporting ahost stack of a Bluetooth protocol and a controller supporting acontroller stack of the Bluetooth protocol, wherein the Bluetooth masterdevice further comprises: a Bluetooth chip configured to create apoint-to-multipoint link from said Bluetooth master device to theplurality of Bluetooth audio sink devices; an interface for receiving amain audio stream part; a circuit for creating a plurality of packetsets based on said main audio stream part, each packet set comprising atleast one packet, each packet set being directed to a respectiveBluetooth audio sink device among the plurality of Bluetooth audio sinkdevices; a circuit for timestamping the at least one packet of eachpacket set based on a synchronized host clock; and a circuit fortransmitting the at least one timestamped packet of each packet set tothe respective Bluetooth audio sink device via a respective wirelesslink of the point-to-multipoint link, said respective wireless linkconnecting the Bluetooth master device and the respective Bluetoothaudio sink device; wherein each Bluetooth audio sink device among theplurality of Bluetooth audio sink devices comprises a respective hostsystem supporting a host stack of a Bluetooth protocol and a respectivecontroller supporting a controller stack of the Bluetooth protocol,wherein each Bluetooth audio sink device among the plurality ofBluetooth audio sink devices further comprises: a circuit for beingwirelessly connected to the Bluetooth master device; a circuit forsynchronizing a host clock of the each Bluetooth audio sink device by:(i) receiving, at the controller, a piconet-synchronized signal; (ii)providing, by the controller to the host system, a derivative of thepiconet-synchronized signal; (iii) determining a latency of theproviding; and (iv) synchronizing, at the host system of the eachBluetooth audio sink device, the host clock with a master timingreference using said latency and the derivative of thepiconet-synchronized signal; an interface for receiving at least onetimestamped packet on a dedicated link established between the eachBluetooth audio sink device and the Bluetooth master device; and anoutput for rendering an audio signal based on the at least onetimestamped packet and on the synchronized host clock of the eachBluetooth audio sink device.